
********************************************************************************
*** Date: 07.10.2025                                                         ***
***                                                                          ***
*** Using packages:                                                          ***
***   estout                                                                 ***
***   fre                                                                    ***
***   grstyle, palettes, colrspace                                           ***
***   kict                                                                   ***
***   xlincom                                                                ***
***                                                                          ***
*** NOTE: This program has been executed in Stata/SE 19.5 for Mac (Silicon)  ***
***                                                                          ***
********************************************************************************

/* Install packages
	foreach p in estout fre grstyle palettes colrspace xlincom {
		ssc install `p', replace
	}
	net install st0559.pkg  // for kict
*/

capture log close
eststo clear
estimates clear
collect clear
clear all
set more off 
set maxvar 10000
global seed = "12345"
global dir = "Replication"  // set the replication directory
cd "$dir"

	* Graph setting *
		set scheme s2color
		grstyle init
		grstyle set plain, nogrid noextend
		grstyle set color #0068fa #f21b1b #4dac26 #7b3294 #bc6949 #6667ab #171e27
		grstyle set symbolsize medlarge
		grstyle set symbol O D S T X Oh Dh Sh
		grstyle set lpattern solid solid solid solid solid
		grstyle set legend 6, nobox
		
		
***************
**** Graph ****
***************
{
		global uri_ub3_4 = 97.50
		global lri_ub3_4 = 95
		global uri_ub2_4 = 90
		global lri_ub2_4 = 87.50
		global uri_ub2_3 = 82.50
		global lri_ub2_3 = 80
		global uri_ub1_2 = 75
		global lri_ub1_2 = 72.50
		
	*************
	// Study 1 //
	*************
	{
		*------------*
		// All Obs. //
		*------------*
		{
			use "$dir/study1", clear
			global rob = "vce(robust)"
			
			* Table S.3. Post-hoc power analyses for Studies 1 and 2 at 10% significance level *
				/*
				Group 1: Fight on the battlefield; 
				Group 2: Defend our country and fight on the battlefield; 
				Group 3: Defend our country and fight; 
				Group 4: Defend our country.
				*/				
				global condi1v2 = `" "1,2" "'
				global condi2v3 = `" "2,3" "'
				global condi2v4 = `" "2,4" "'
				global condi3v4 = `" "3,4" "'
				
				cap matrix drop study1
				foreach condi in $condi1v2 $condi2v3 $condi2v4 $condi3v4 {
					qui ttest will_fight_2, by(treatment_word) , if inlist(treatment_word, `condi')
						global s1_n_1: dis `r(N_1)'
						global s1_n_2: dis `r(N_2)'
						global s1_n_tot_1v2: dis `r(N_1)' + `r(N_2)'
						global s1_nratio_1v2: dis `r(N_2)' / `r(N_1)'
						global s1_m_1: dis `r(mu_1)'
						global s1_m_2: dis `r(mu_2)'
						global s1_sd_1: dis `r(sd_1)'
						global s1_sd_2: dis `r(sd_2)'
					power twomeans $s1_m_1 $s1_m_2, alpha(0.1) ///
						n1($s1_n_1) n2($s1_n_2) sd1($s1_sd_1) sd2($s1_sd_2) ///
						table(N1 m1 sd1 N2 m2 sd2 power, formats(m1 "%5.2f" sd1 "%5.2f" m2 "%5.2f" sd2 "%5.2f" power "%5.2f"))
					mat study1 = nullmat(study1)\r(pss_table)
				}
				
			preserve
			reg will_fight_2 ib1.treatment_word
				lincom i1.treatment_word - i2.treatment_word
					global diff1_2: dis %4.1f abs(r(estimate) * 100)
					global p1_2: dis %5.3f r(p)
				lincom i2.treatment_word - i3.treatment_word
					global diff2_3: dis %4.1f abs(r(estimate) * 100)
					global p2_3: dis %5.3f r(p)
				lincom i2.treatment_word - i4.treatment_word
					global diff2_4: dis %4.1f abs(r(estimate) * 100)
					global p2_4: dis %5.3f r(p)
				lincom i3.treatment_word - i4.treatment_word
					global diff3_4: dis %4.1f abs(r(estimate) * 100)
					global p3_4: dis %5.3f r(p)
					
			statsby, by(treatment_word) clear: ci mean will_fight_2
			
			foreach v in mean ub lb se {
				replace `v' = `v' * 100
			}
			foreach v in mean ub lb {
				separate `v', by(treatment_word)
			}
			
			twoway (bar mean1 treatment_word, fcolor(navy) lcolor(none) barw(0.4) base(0)) ///
						 (bar mean2 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (bar mean3 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (bar mean4 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (rcap ub1 lb1 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub2 lb2 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub3 lb3 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub4 lb4 treatment_word, lw(medium) lc("242 27 27")) ///
						 (scatter mean treatment_word, mlabel(mean) mlabformat(%9.1fc) ///
								msymbol(none) mlabcolor("37 37 37") mlabposition(2)) ///
						 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, ///
								recast(dropline) base($lri_ub3_4) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, ///
								recast(dropline) base($lri_ub2_4) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, ///
								recast(dropline) base($lri_ub2_3) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, ///
								recast(dropline) base($lri_ub1_2) lw(medium) mc(none) lc(black) lp(dash)) ///
						 , text($uri_ub3_4 3.5 "diff = $diff3_4, p = $p3_4", place(n) size(small)) ///
							 text($uri_ub2_4 3 "diff = $diff2_4, p = $p2_4", place(n) size(small)) ///
							 text($uri_ub2_3 2.5 "diff = $diff2_3, p = $p2_3", place(n) size(small)) ///
							 text($uri_ub1_2 1.5 "diff = $diff1_2, p = $p1_2", place(n) size(small)) ///
						 legend(off) ylabel(0(25)100, labsize(vsmall) angle(horizontal)) ///
						 xlabel(1 "Fight on the battlefield" 2 `""Defend our country and" "fight on the battlefield""' ///
										3 "Defend our country and fight" 4 "Defend our country", ///
										noticks labsize(vsmall)) ///
						 ytitle("Willingness to Fight (%)", size(small)) ///
						 title("") ///
						 xtitle("") ///
						 xscale(range(0.7 4) )
						 
			graph export "$dir/Figure/Figure_1.png", width(3200) replace
			restore
		}
		
		*-------------*
		// By Gender //
		*-------------*
		{
			* Male *
				use "$dir/study1", clear
				global rob = "vce(robust)"
				keep if male == 1
				
				preserve
				reg will_fight_2 ib1.treatment_word
					lincom i1.treatment_word - i2.treatment_word
						global diff1_2: dis %4.1f abs(r(estimate) * 100)
						global p1_2: dis %5.3f r(p)
					lincom i2.treatment_word - i3.treatment_word
						global diff2_3: dis %4.1f abs(r(estimate) * 100)
						global p2_3: dis %5.3f r(p)
					lincom i2.treatment_word - i4.treatment_word
						global diff2_4: dis %4.1f abs(r(estimate) * 100)
						global p2_4: dis %5.3f r(p)
					lincom i3.treatment_word - i4.treatment_word
						global diff3_4: dis %4.1f abs(r(estimate) * 100)
						global p3_4: dis %5.3f r(p)
						
				statsby, by(treatment_word) clear: ci mean will_fight_2
				
				foreach v in mean ub lb se {
					replace `v' = `v' * 100
				}
				foreach v in mean ub lb {
					separate `v', by(treatment_word)
				}
				
				twoway (bar mean1 treatment_word, fcolor(navy) lcolor(none) barw(0.4) base(0)) ///
							 (bar mean2 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean3 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean4 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (rcap ub1 lb1 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub2 lb2 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub3 lb3 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub4 lb4 treatment_word, lw(medium) lc("242 27 27")) ///
							 (scatter mean treatment_word, mlabel(mean) mlabformat(%9.1fc) ///
									msymbol(none) mlabcolor("37 37 37") mlabposition(2)) ///
							 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, ///
									recast(dropline) base($lri_ub3_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, ///
									recast(dropline) base($lri_ub2_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, ///
									recast(dropline) base($lri_ub2_3) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, ///
									recast(dropline) base($lri_ub1_2) lw(medium) mc(none) lc(black) lp(dash)) ///
							 , text($uri_ub3_4 3.5 "diff = $diff3_4, p = $p3_4", place(n) size(small)) ///
								 text($uri_ub2_4 3 "diff = $diff2_4, p = $p2_4", place(n) size(small)) ///
								 text($uri_ub2_3 2.5 "diff = $diff2_3, p = $p2_3", place(n) size(small)) ///
								 text($uri_ub1_2 1.5 "diff = $diff1_2, p = $p1_2", place(n) size(small)) ///
							 legend(off) ylabel(0(25)100, labsize(vsmall) angle(horizontal)) ///
							 xlabel(1 "Fight on the battlefield" 2 `""Defend our country and" "fight on the battlefield""' ///
											3 "Defend our country and fight" 4 "Defend our country", ///
											noticks labsize(vsmall)) ///
							 ytitle("Willingness to Fight (%)", size(small)) ///
							 title("") ///
							 xtitle("") ///
							 xscale(range(0.7 4) )
							 
				graph export "$dir/Figure/Figure_S_4_1.png", width(3200) replace
				restore
				
			* Female *
				use "$dir/study1", clear
				global rob = "vce(robust)"
				keep if female == 1
				
				preserve
				reg will_fight_2 ib1.treatment_word
					lincom i1.treatment_word - i2.treatment_word
						global diff1_2: dis %4.1f abs(r(estimate) * 100)
						global p1_2: dis %5.3f r(p)
					lincom i2.treatment_word - i3.treatment_word
						global diff2_3: dis %4.1f abs(r(estimate) * 100)
						global p2_3: dis %5.3f r(p)
					lincom i2.treatment_word - i4.treatment_word
						global diff2_4: dis %4.1f abs(r(estimate) * 100)
						global p2_4: dis %5.3f r(p)
					lincom i3.treatment_word - i4.treatment_word
						global diff3_4: dis %4.1f abs(r(estimate) * 100)
						global p3_4: dis %5.3f r(p)
						
				statsby, by(treatment_word) clear: ci mean will_fight_2
				
				foreach v in mean ub lb se {
					replace `v' = `v' * 100
				}
				foreach v in mean ub lb {
					separate `v', by(treatment_word)
				}
				
				twoway (bar mean1 treatment_word, fcolor(navy) lcolor(none) barw(0.4) base(0)) ///
							 (bar mean2 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean3 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean4 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (rcap ub1 lb1 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub2 lb2 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub3 lb3 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub4 lb4 treatment_word, lw(medium) lc("242 27 27")) ///
							 (scatter mean treatment_word, mlabel(mean) mlabformat(%9.1fc) ///
									msymbol(none) mlabcolor("37 37 37") mlabposition(2)) ///
							 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, ///
									recast(dropline) base($lri_ub3_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, ///
									recast(dropline) base($lri_ub2_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, ///
									recast(dropline) base($lri_ub2_3) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, ///
									recast(dropline) base($lri_ub1_2) lw(medium) mc(none) lc(black) lp(dash)) ///
							 , text($uri_ub3_4 3.5 "diff = $diff3_4, p = $p3_4", place(n) size(small)) ///
								 text($uri_ub2_4 3 "diff = $diff2_4, p = $p2_4", place(n) size(small)) ///
								 text($uri_ub2_3 2.5 "diff = $diff2_3, p = $p2_3", place(n) size(small)) ///
								 text($uri_ub1_2 1.5 "diff = $diff1_2, p = $p1_2", place(n) size(small)) ///
							 legend(off) ylabel(0(25)100, labsize(vsmall) angle(horizontal)) ///
							 xlabel(1 "Fight on the battlefield" 2 `""Defend our country and" "fight on the battlefield""' ///
											3 "Defend our country and fight" 4 "Defend our country", ///
											noticks labsize(vsmall)) ///
							 ytitle("Willingness to Fight (%)", size(small)) ///
							 title("") ///
							 xtitle("") ///
							 xscale(range(0.7 4) )
							 
				graph export "$dir/Figure/Figure_S_4_2.png", width(3200) replace
				restore
		}
	}
	
	******************************
	// Study 2 and WVS (Taiwan) //
	******************************
	{
		*------------*
		// All Obs. //
		*------------*
		{
			use "$dir/study2", clear
			gen year = 2024
			gen wave = .
			keep year wave will_fight_2 treatment_word female male agen
			order year wave will_fight_2 treatment_word female male agen
			append using "$dir/wvs_taiwan"
			global rob = "vce(robust)"
			keep if year >= 2019
			
			* Table S.3. Post-hoc power analyses for Studies 1 and 2 at 10% significance level *
				/*
				Group 1: Fight on the battlefield; 
				Group 2: Defend our country and fight on the battlefield; 
				Group 3: Defend our country and fight; 
				Group 4: Defend our country.
				Group 5: WVS-2019
				*/
				global condi1v2 = `" "treatment_word, 1, 2" "'
				global condi2v3 = `" "treatment_word, 2, 3" "'
				global condi2v4 = `" "treatment_word, 2, 4" "'
				global condi3v4 = `" "treatment_word, 3, 4" "'
				global condi4v5 = `" "treatment_word, 4, 5" "'
				global condi3v5 = `" "treatment_word, 3, 5" "'
			
				cap matrix drop study2
				foreach condi in $condi1v2 $condi2v3 $condi2v4 $condi3v4 {
					qui ttest will_fight_2, by(treatment_word) , if inlist(`condi')
						global s1_n_1: dis `r(N_1)'
						global s1_n_2: dis `r(N_2)'
						global s1_n_tot_1v2: dis `r(N_1)' + `r(N_2)'
						global s1_nratio_1v2: dis `r(N_2)' / `r(N_1)'
						global s1_m_1: dis `r(mu_1)'
						global s1_m_2: dis `r(mu_2)'
						global s1_sd_1: dis `r(sd_1)'
						global s1_sd_2: dis `r(sd_2)'
					power twomeans $s1_m_1 $s1_m_2, alpha(0.1) ///
						n1($s1_n_1) n2($s1_n_2) sd1($s1_sd_1) sd2($s1_sd_2) ///
						table(N1 m1 sd1 N2 m2 sd2 power, formats(m1 "%5.2f" sd1 "%5.2f" m2 "%5.2f" sd2 "%5.2f" power "%5.2f"))
					mat study2 = nullmat(study2)\r(pss_table)
					dis %5.2f `r(power)'
				}
				
			preserve
			reg will_fight_2 ib1.treatment_word
				lincom i1.treatment_word - i2.treatment_word
					global diff1_2: dis %4.1f abs(r(estimate) * 100)
					global p1_2: dis %5.3f r(p)
				lincom i2.treatment_word - i3.treatment_word
					global diff2_3: dis %4.1f abs(r(estimate) * 100)
					global p2_3: dis %5.3f r(p)
				lincom i2.treatment_word - i4.treatment_word
					global diff2_4: dis %4.1f abs(r(estimate) * 100)
					global p2_4: dis %5.3f r(p)
				lincom i3.treatment_word - i4.treatment_word
					global diff3_4: dis %4.1f abs(r(estimate) * 100)
					global p3_4: dis %5.3f r(p)
				lincom i4.treatment_word - i5.treatment_word
					global diff4_5: dis %4.1f abs(r(estimate) * 100)
					global p4_5: dis %5.3f r(p)
				lincom i3.treatment_word - i5.treatment_word
					global diff3_5: dis %4.1f abs(r(estimate) * 100)
					global p3_5: dis %5.3f r(p)
					
			statsby, by(treatment_word) clear: ci mean will_fight_2
			
			foreach v in mean ub lb se {
				replace `v' = `v' * 100
			}
			foreach v in mean ub lb {
				separate `v', by(treatment_word)
			}
			
			global uri_ub3_5 = 105
			global lri_ub3_5 = 102.5
			global uri_ub4_5 = 97.50
			global lri_ub4_5 = 95
			
			twoway (bar mean1 treatment_word, fcolor(navy) lcolor(none) barw(0.4) base(0)) ///
						 (bar mean2 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (bar mean3 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (bar mean4 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (bar mean5 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (rcap ub1 lb1 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub2 lb2 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub3 lb3 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub4 lb4 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub5 lb5 treatment_word, lw(medium) lc("242 27 27")) ///
						 (scatter mean treatment_word, mlabel(mean) mlabformat(%9.1fc) ///
								msymbol(none) mlabcolor("37 37 37") mlabposition(2)) ///
						 (scatteri $uri_ub3_5 5 $uri_ub3_5 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub3_5 5 $uri_ub3_5 3, ///
								recast(dropline) base($lri_ub3_5) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub4_5 5 $uri_ub4_5 4.05, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub4_5 5 $uri_ub4_5 4.05, ///
								recast(dropline) base($lri_ub4_5) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub3_4 3.95 $uri_ub3_4 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub3_4 3.95 $uri_ub3_4 3, ///
								recast(dropline) base($lri_ub3_4) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, ///
								recast(dropline) base($lri_ub2_4) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, ///
								recast(dropline) base($lri_ub2_3) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, ///
								recast(dropline) base($lri_ub1_2) lw(medium) mc(none) lc(black) lp(dash)) ///
						 , text($uri_ub3_5 4 "diff = $diff3_5, p = $p3_5", place(n) size(small)) ///
							 text($uri_ub4_5 4.525 "diff = $diff4_5, p = $p4_5", place(n) size(small)) ///
							 text($uri_ub3_4 3.475 "diff = $diff3_4, p = $p3_4", place(n) size(small)) ///
							 text($uri_ub2_4 3 "diff = $diff2_4, p = $p2_4", place(n) size(small)) ///
							 text($uri_ub2_3 2.5 "diff = $diff2_3, p = $p2_3", place(n) size(small)) ///
							 text($uri_ub1_2 1.5 "diff = $diff1_2, p = $p1_2", place(n) size(small)) ///
							 text( -9.5 1.01 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
							 text( -5 2.5 "{superscript:___________________________________}", orientation(rhorizontal) size(*2.012)) ///
							 text( -9.5 4 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
							 text( -9.5 4.79 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
							 text( -5 5 "{superscript:_____}", orientation(rhorizontal) size(*2.012)) ///
							 text( -9.5 5.22 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
						 legend(off) ylabel(0(25)100, labsize(vsmall) angle(horizontal)) ///
						 xlabel(1 "Fight on the battlefield" 2 `""Defend our country and" "fight on the battlefield""' ///
										3 "Defend our country and fight" 4 "Defend our country" ///
										5 "Defend our country and fight", ///
										noticks labsize(vsmall)) ///
						 xmlabel(2.5 "Study 2" 5 "WVS-2019", ///
								tlc(none) tlength(*6) labsize(small) labgap(20pt)) ///
						 ytitle("Willingness to Fight (%)", size(small)) ///
						 title("") ///
						 xtitle("") ///
						 xscale(range(0.5 5.5) ) ///
						 plotregion(margin(l=0 r=0 b=0 t=0)) xsize(6)
						 
			graph export "$dir/Figure/Figure_2.png", width(3200) replace
			restore
		}
		
		*-------------*
		// By Gender //
		*-------------*
		{
			* Male *
				use "$dir/study2", clear
				gen year = 2024
				gen wave = .
				keep year wave will_fight_2 treatment_word female male agen
				order year wave will_fight_2 treatment_word female male agen
				append using "$dir/wvs_taiwan"
				global rob = "vce(robust)"
				keep if year >= 2019
				keep if male == 1
				
				preserve
				reg will_fight_2 ib1.treatment_word
				lincom i1.treatment_word - i2.treatment_word
					global diff1_2: dis %4.1f abs(r(estimate) * 100)
					global p1_2: dis %5.3f r(p)
				lincom i2.treatment_word - i3.treatment_word
					global diff2_3: dis %4.1f abs(r(estimate) * 100)
					global p2_3: dis %5.3f r(p)
				lincom i2.treatment_word - i4.treatment_word
					global diff2_4: dis %4.1f abs(r(estimate) * 100)
					global p2_4: dis %5.3f r(p)
				lincom i3.treatment_word - i4.treatment_word
					global diff3_4: dis %4.1f abs(r(estimate) * 100)
					global p3_4: dis %5.3f r(p)
				lincom i4.treatment_word - i5.treatment_word
					global diff4_5: dis %4.1f abs(r(estimate) * 100)
					global p4_5: dis %5.3f r(p)
				lincom i3.treatment_word - i5.treatment_word
					global diff3_5: dis %4.1f abs(r(estimate) * 100)
					global p3_5: dis %5.3f r(p)
					
				statsby, by(treatment_word) clear: ci mean will_fight_2
				
				foreach v in mean ub lb se {
					replace `v' = `v' * 100
				}
				foreach v in mean ub lb {
					separate `v', by(treatment_word)
				}
				
				global uri_ub3_5 = 105
				global lri_ub3_5 = 102.5
				global uri_ub4_5 = 97.50
				global lri_ub4_5 = 95
				
				twoway (bar mean1 treatment_word, fcolor(navy) lcolor(none) barw(0.4) base(0)) ///
							 (bar mean2 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean3 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean4 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean5 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (rcap ub1 lb1 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub2 lb2 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub3 lb3 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub4 lb4 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub5 lb5 treatment_word, lw(medium) lc("242 27 27")) ///
							 (scatter mean treatment_word, mlabel(mean) mlabformat(%9.1fc) ///
									msymbol(none) mlabcolor("37 37 37") mlabposition(2)) ///
							 (scatteri $uri_ub3_5 5 $uri_ub3_5 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub3_5 5 $uri_ub3_5 3, ///
									recast(dropline) base($lri_ub3_5) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub4_5 5 $uri_ub4_5 4.05, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub4_5 5 $uri_ub4_5 4.05, ///
									recast(dropline) base($lri_ub4_5) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub3_4 3.95 $uri_ub3_4 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub3_4 3.95 $uri_ub3_4 3, ///
									recast(dropline) base($lri_ub3_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, ///
									recast(dropline) base($lri_ub2_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, ///
									recast(dropline) base($lri_ub2_3) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, ///
									recast(dropline) base($lri_ub1_2) lw(medium) mc(none) lc(black) lp(dash)) ///
							 , text($uri_ub3_5 4 "diff = $diff3_5, p = $p3_5", place(n) size(small)) ///
								 text($uri_ub4_5 4.525 "diff = $diff4_5, p = $p4_5", place(n) size(small)) ///
								 text($uri_ub3_4 3.475 "diff = $diff3_4, p = $p3_4", place(n) size(small)) ///
								 text($uri_ub2_4 3 "diff = $diff2_4, p = $p2_4", place(n) size(small)) ///
								 text($uri_ub2_3 2.5 "diff = $diff2_3, p = $p2_3", place(n) size(small)) ///
								 text($uri_ub1_2 1.5 "diff = $diff1_2, p = $p1_2", place(n) size(small)) ///
								 text( -9.5 1.01 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
								 text( -5 2.5 "{superscript:___________________________________}", orientation(rhorizontal) size(*2.012)) ///
								 text( -9.5 4 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
								 text( -9.5 4.79 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
								 text( -5 5 "{superscript:_____}", orientation(rhorizontal) size(*2.012)) ///
								 text( -9.5 5.22 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
							 legend(off) ylabel(0(25)100, labsize(vsmall) angle(horizontal)) ///
							 xlabel(1 "Fight on the battlefield" 2 `""Defend our country and" "fight on the battlefield""' ///
											3 "Defend our country and fight" 4 "Defend our country" ///
											5 "Defend our country and fight", ///
											noticks labsize(vsmall)) ///
							 xmlabel(2.5 "Study 2" 5 "WVS-2019", ///
									tlc(none) tlength(*6) labsize(small) labgap(20pt)) ///
							 ytitle("Willingness to Fight (%)", size(small)) ///
							 title("") ///
							 xtitle("") ///
							 xscale(range(0.5 5.5) ) ///
							 plotregion(margin(l=0 r=0 b=0 t=0)) xsize(6)
							 
				graph export "$dir/Figure/Figure_S_4_3.png", width(3200) replace
				restore
				
			* Female *
				use "$dir/study2", clear
				gen year = 2024
				gen wave = .
				keep year wave will_fight_2 treatment_word female male agen
				order year wave will_fight_2 treatment_word female male agen
				append using "$dir/wvs_taiwan"
				global rob = "vce(robust)"
				keep if year >= 2019
				keep if female == 1
				
				preserve
				reg will_fight_2 ib1.treatment_word
				lincom i1.treatment_word - i2.treatment_word
					global diff1_2: dis %4.1f abs(r(estimate) * 100)
					global p1_2: dis %5.3f r(p)
				lincom i2.treatment_word - i3.treatment_word
					global diff2_3: dis %4.1f abs(r(estimate) * 100)
					global p2_3: dis %5.3f r(p)
				lincom i2.treatment_word - i4.treatment_word
					global diff2_4: dis %4.1f abs(r(estimate) * 100)
					global p2_4: dis %5.3f r(p)
				lincom i3.treatment_word - i4.treatment_word
					global diff3_4: dis %4.1f abs(r(estimate) * 100)
					global p3_4: dis %5.3f r(p)
				lincom i4.treatment_word - i5.treatment_word
					global diff4_5: dis %4.1f abs(r(estimate) * 100)
					global p4_5: dis %5.3f r(p)
				lincom i3.treatment_word - i5.treatment_word
					global diff3_5: dis %4.1f abs(r(estimate) * 100)
					global p3_5: dis %5.3f r(p)
					
				statsby, by(treatment_word) clear: ci mean will_fight_2
				
				foreach v in mean ub lb se {
					replace `v' = `v' * 100
				}
				foreach v in mean ub lb {
					separate `v', by(treatment_word)
				}
				
				global uri_ub3_5 = 105
				global lri_ub3_5 = 102.5
				global uri_ub4_5 = 97.50
				global lri_ub4_5 = 95
				
				twoway (bar mean1 treatment_word, fcolor(navy) lcolor(none) barw(0.4) base(0)) ///
							 (bar mean2 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean3 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean4 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (bar mean5 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
							 (rcap ub1 lb1 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub2 lb2 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub3 lb3 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub4 lb4 treatment_word, lw(medium) lc("242 27 27")) ///
							 (rcap ub5 lb5 treatment_word, lw(medium) lc("242 27 27")) ///
							 (scatter mean treatment_word, mlabel(mean) mlabformat(%9.1fc) ///
									msymbol(none) mlabcolor("37 37 37") mlabposition(2)) ///
							 (scatteri $uri_ub3_5 5 $uri_ub3_5 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub3_5 5 $uri_ub3_5 3, ///
									recast(dropline) base($lri_ub3_5) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub4_5 5 $uri_ub4_5 4.05, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub4_5 5 $uri_ub4_5 4.05, ///
									recast(dropline) base($lri_ub4_5) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub3_4 3.95 $uri_ub3_4 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub3_4 3.95 $uri_ub3_4 3, ///
									recast(dropline) base($lri_ub3_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, ///
									recast(dropline) base($lri_ub2_4) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, ///
									recast(dropline) base($lri_ub2_3) lw(medium) mc(none) lc(black) lp(dash)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
							 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, ///
									recast(dropline) base($lri_ub1_2) lw(medium) mc(none) lc(black) lp(dash)) ///
							 , text($uri_ub3_5 4 "diff = $diff3_5, p = $p3_5", place(n) size(small)) ///
								 text($uri_ub4_5 4.525 "diff = $diff4_5, p = $p4_5", place(n) size(small)) ///
								 text($uri_ub3_4 3.475 "diff = $diff3_4, p = $p3_4", place(n) size(small)) ///
								 text($uri_ub2_4 3 "diff = $diff2_4, p = $p2_4", place(n) size(small)) ///
								 text($uri_ub2_3 2.5 "diff = $diff2_3, p = $p2_3", place(n) size(small)) ///
								 text($uri_ub1_2 1.5 "diff = $diff1_2, p = $p1_2", place(n) size(small)) ///
								 text( -9.5 1.01 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
								 text( -5 2.5 "{superscript:___________________________________}", orientation(rhorizontal) size(*2.012)) ///
								 text( -9.5 4 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
								 text( -9.5 4.79 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
								 text( -5 5 "{superscript:_____}", orientation(rhorizontal) size(*2.012)) ///
								 text( -9.5 5.22 "{subscript:|}", orientation(horizontal) size(*1.2)) ///
							 legend(off) ylabel(0(25)100, labsize(vsmall) angle(horizontal)) ///
							 xlabel(1 "Fight on the battlefield" 2 `""Defend our country and" "fight on the battlefield""' ///
											3 "Defend our country and fight" 4 "Defend our country" ///
											5 "Defend our country and fight", ///
											noticks labsize(vsmall)) ///
							 xmlabel(2.5 "Study 2" 5 "WVS-2019", ///
									tlc(none) tlength(*6) labsize(small) labgap(20pt)) ///
							 ytitle("Willingness to Fight (%)", size(small)) ///
							 title("") ///
							 xtitle("") ///
							 xscale(range(0.5 5.5) ) ///
							 plotregion(margin(l=0 r=0 b=0 t=0)) xsize(6)
							 
				graph export "$dir/Figure/Figure_S_4_4.png", width(3200) replace
				restore
		}
	}
	
	*************
	// Study 3 //
	*************
	{
		*------------*
		// All Obs. //
		*------------*
		{
			use "$dir/study3", clear
			
			preserve
			reg will_fight_2 ib1.treatment_word
				lincom i1.treatment_word - i2.treatment_word
					global diff1_2: dis %4.1f abs(r(estimate) * 100)
					global p1_2: dis %5.3f r(p)
				lincom i2.treatment_word - i3.treatment_word
					global diff2_3: dis %4.1f abs(r(estimate) * 100)
					global p2_3: dis %5.3f r(p)
				lincom i2.treatment_word - i4.treatment_word
					global diff2_4: dis %4.1f abs(r(estimate) * 100)
					global p2_4: dis %5.3f r(p)
				lincom i3.treatment_word - i4.treatment_word
					global diff3_4: dis %4.1f abs(r(estimate) * 100)
					global p3_4: dis %5.3f r(p)
					
			statsby, by(treatment_word) clear: ci mean will_fight_2
			
			foreach v in mean ub lb se {
				replace `v' = `v' * 100
			}
			foreach v in mean ub lb {
					separate `v', by(treatment_word)
			}
			
			twoway (bar mean1 treatment_word, fcolor(navy) lcolor(none) barw(0.4) base(0)) ///
						 (bar mean2 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (bar mean3 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (bar mean4 treatment_word, fcolor(navy) lcolor(none) barw(0.4)) ///
						 (rcap ub1 lb1 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub2 lb2 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub3 lb3 treatment_word, lw(medium) lc("242 27 27")) ///
						 (rcap ub4 lb4 treatment_word, lw(medium) lc("242 27 27")) ///
						 (scatter mean treatment_word, mlabel(mean) mlabformat(%9.1fc) ///
								msymbol(none) mlabcolor("37 37 37") mlabposition(2)) ///
						 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub3_4 4 $uri_ub3_4 3, ///
								recast(dropline) base($lri_ub3_4) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub2_4 4 $uri_ub2_4 2, ///
								recast(dropline) base($lri_ub2_4) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub2_3 3 $uri_ub2_3 2, ///
								recast(dropline) base($lri_ub2_3) lw(medium) mc(none) lc(black) lp(dash)) ///
						 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, recast(line) lw(medium) mc(none) lc(black) lp(solid)) ///
						 (scatteri $uri_ub1_2 2 $uri_ub1_2 1, ///
								recast(dropline) base($lri_ub1_2) lw(medium) mc(none) lc(black) lp(dash)) ///
						 , text($uri_ub3_4 3.5 "diff = $diff3_4, p = $p3_4", place(n) size(small)) ///
							 text($uri_ub2_4 3 "diff = $diff2_4, p = $p2_4", place(n) size(small)) ///
							 text($uri_ub2_3 2.5 "diff = $diff2_3, p = $p2_3", place(n) size(small)) ///
							 text($uri_ub1_2 1.5 "diff = $diff1_2, p = $p1_2", place(n) size(small)) ///
						 legend(off) ylabel(0(25)100, labsize(vsmall) angle(horizontal)) ///
						 xlabel(1 "Fight on the battlefield" 2 `""Defend our country and" "fight on the battlefield""' ///
										3 "Defend our country and fight" 4 "Defend our country", ///
										noticks labsize(vsmall)) ///
						 ytitle("Willingness to Fight (%)", size(small)) ///
						 title("") ///
						 xtitle("") ///
						 xscale(range(0.7 4) )
						 
			graph export "$dir/Figure/Figure_3.png", width(3200) replace
			restore
		}
	}
}


*******************
**** Aanalysis ****
*******************
{
	*************
	// Study 1 //
	*************
	{
		use "$dir/study1", clear
		global rob = "vce(robust)"
		global cov = "male agen agen2 high_educ taiwanese_2 ib1.partisanship_3 "
		qui reg will_fight_2 ib1.treatment_word $cov, $rob
		keep if e(sample)
		
		* OLS *
			reg will_fight_2 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///  linear hypothesis test in regression table
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_ols1
			reg will_fight_2 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_ols2
				
		* Logit *
			logit will_fight_2 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_logit1
			logit will_fight_2 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_logit2
				
		* Ordered logit *
			ologit will_fight_4 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_ologit1
			ologit will_fight_4 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_ologit2
				
		* Male *
			reg will_fight_2 ib1.treatment_word $cov, $rob, if male == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_male_ols1
			logit will_fight_2 ib1.treatment_word $cov, $rob, if male == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_male_logit1
			ologit will_fight_4 ib1.treatment_word $cov, $rob, if male == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_male_ologit1
				
		* Female *
			reg will_fight_2 ib1.treatment_word $cov, $rob, if female == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_female_ols1
			logit will_fight_2 ib1.treatment_word $cov, $rob, if female == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_female_logit1
			ologit will_fight_4 ib1.treatment_word $cov, $rob, if female == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s1_female_ologit1
				
		* Treatment X Patriotism *
			reg will_fight_2 ib1.treatment_word##i.patriotism_2 $cov, $rob
				est store ols_words_2_X_patriot_2
			reg will_fight_4 ib1.treatment_word##i.patriotism_2 $cov, $rob
				est store ols_words_4_X_patriot_2
	}
	
	*************
	// Study 2 //
	*************
	{
		use "$dir/study2", clear
		global rob = "vce(robust)"
		global cov = "male agen agen2 high_educ taiwanese_2 ib1.partisanship_3 "
		qui reg will_fight_2 ib1.treatment_word $cov, $rob
		keep if e(sample)
		
		* OLS *
			reg will_fight_2 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_ols1
			reg will_fight_2 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_ols2
				
		* Logit *
			logit will_fight_2 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_logit1
			logit will_fight_2 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_logit2
				
		* Ordered logit *
			ologit will_fight_4 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_ologit1
			ologit will_fight_4 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_ologit2
				
		* Male *
			reg will_fight_2 ib1.treatment_word $cov, $rob, if male == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_male_ols1
			logit will_fight_2 ib1.treatment_word $cov, $rob, if male == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_male_logit1
			ologit will_fight_4 ib1.treatment_word $cov, $rob, if male == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_male_ologit1
				
		* Female *
			reg will_fight_2 ib1.treatment_word $cov, $rob, if female == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_female_ols1
			logit will_fight_2 ib1.treatment_word $cov, $rob, if female == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_female_logit1
			ologit will_fight_4 ib1.treatment_word $cov, $rob, if female == 1
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s2_female_ologit1
	}
	
	*************
	// Study 3 //
	*************
	{
		use "$dir/study3", clear
		global cov = "agen agen2 high_educ "
		qui reg will_fight_2 ib1.treatment_word $cov, $rob
		keep if e(sample)
		
		* OLS *
			reg will_fight_2 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s3_ols1
			reg will_fight_2 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s3_ols2
				
		* Logit *
			logit will_fight_2 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s3_logit1
			logit will_fight_2 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s3_logit2
					
		* Ordered logit *
			ologit will_fight_4 ib1.treatment_word, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s3_ologit1
			ologit will_fight_4 ib1.treatment_word $cov, $rob
				xlincom (i2.treatment_word - i3.treatment_word) ///
								(i2.treatment_word - i4.treatment_word) ///
								(i3.treatment_word - i4.treatment_word)
				est store s3_ologit2
	}
	
	*************
	// Study 4 //
	*************
	{
		use "$dir/study4", clear
		global cov = "agen agen2 high_educ "
		reg listscore_defend_battle $cov
		keep if e(sample)
		
		* S.11: Testing treatment randomization *
			ttest agen, by(listgroup_defend_battle)
			tab high_educ listgroup_defend_battle, chi2 col
			
		* S.12: Testing no-design-effect in Study 4 *
			kict deff listscore_defend_battle, nnonkey(3) condition(listgroup_defend_battle)
				/* no-design-effect assumption does hold */
				
		* Defend our country and fight on the battlefield *
			sum list_defend_battle_t
				global mean_list_q_t = r(mean)
			sum list_defend_battle_c
				global mean_list_q_c = r(mean)
			sum will_fight_defend_battle_2
				global mean_willing_fight = r(mean)
			dis %3.1fc ($mean_list_q_t - $mean_list_q_c) * 100  /* about 36.8% will defend our country and fight on the battlefield */
			dis %3.1fc ($mean_list_q_t - $mean_list_q_c - $mean_willing_fight) * 100  /* social desirability bias is about 9.8% */
			
			kict ls listscore_defend_battle, ///
				nnonkey(3) condition(listgroup_defend_battle) estimator(linear) vce(robust)
			dis %3.1fc (_b[Delta:_cons] * 100)
	}
	
	******************
	** Output Table **
	******************
	{	
		* Table S.7. Regression results from linear probability models *
			esttab s1_ols1 s1_ols2 s2_ols1 s2_ols2 s3_ols1 s3_ols2 ///
				, replace ///
				mgroups("Model 1 (Study 1)" "Model 2 (Study 2)" "Model 3 (Study 3)", pattern(1 0 1 0 1 0)) ///
				mtitles("(a)" "(b)" "(a)" "(b)" "(a)" "(b)") ///
				label compress nonumbers ///
				varwidth(30) modelwidth(12) ///
				stats(r2_a N, ///
					labels("Adj R-sq." "No. of Obs.")) ///
				starlevels("`=uchar(8224)'" 0.10 * 0.05 ** 0.01 *** 0.001) ///
				varlabels(_cons "Constant" male "Male" taiwanese_2 "Taiwanese Identity" ///
					1.treatment_word "Group 1" 2.treatment_word "Group 2" ///
					3.treatment_word "Group 3" 4.treatment_word "Group 4" ///
					1.partisanship_3 "Partisanship" 2.partisanship_3 "Not Incumbent" 3.partisanship_3 "Incumbent") ///
				cells(b(fmt(3)) se(fmt(3) par) p(fmt(3) par([ ]))) ///
				nonote ///
				addnotes("Note: Group 2: Defend our country and fight on the battlefield; Group 3: Defend our country and fight. Group 4: Defend our country. The baseline group is Group 1: Fight on the battlefield. All models report OLS regression. Robust standard errors in parentheses. P-values in brackets.")
				
		* Table S.8. Logit regression results *
			esttab s1_logit1 s1_logit2 s2_logit1 s2_logit2 s3_logit1 s3_logit2 ///
				, replace ///
				mgroups("Model 1 (Study 1)" "Model 2 (Study 2)" "Model 3 (Study 3)", pattern(1 0 1 0 1 0)) ///
				mtitles("(a)" "(b)" "(a)" "(b)" "(a)" "(b)") ///
				label compress nonumbers ///
				varwidth(30) modelwidth(12) ///
				stats(ll N, ///
					labels("Log likelihood" "No. of Obs.")) ///
				starlevels("`=uchar(8224)'" 0.10 * 0.05 ** 0.01 *** 0.001) ///
				varlabels(_cons "Constant" male "Male" taiwanese_2 "Taiwanese Identity" ///
					1.treatment_word "Group 1" 2.treatment_word "Group 2" ///
					3.treatment_word "Group 3" 4.treatment_word "Group 4" ///
					1.partisanship_3 "Partisanship" 2.partisanship_3 "Not Incumbent" 3.partisanship_3 "Incumbent") ///
				cells(b(fmt(3)) se(fmt(3) par) p(fmt(3) par([ ]))) ///
				nonote ///
				addnotes("Note: Group 2: Defend our country and fight on the battlefield; Group 3: Defend our country and fight. Group 4: Defend our country. The baseline group is Group 1: Fight on the battlefield. All models report logit regression. Robust standard errors in parentheses. P-values in brackets.")
				
		* Table S.9. Ordered logit regression results *
			esttab s1_ologit1 s1_ologit2 s2_ologit1 s2_ologit2 s3_ologit1 s3_ologit2 ///
				, replace ///
				mgroups("Model 1 (Study 1)" "Model 2 (Study 2)" "Model 3 (Study 3)", pattern(1 0 1 0 1 0)) ///
				mtitles("(a)" "(b)" "(a)" "(b)" "(a)" "(b)") ///
				label compress nonumbers ///
				varwidth(30) modelwidth(12) ///
				stats(ll N, ///
					labels("Log likelihood" "No. of Obs.")) ///
				starlevels("`=uchar(8224)'" 0.10 * 0.05 ** 0.01 *** 0.001) ///
				varlabels(_cons "Constant" male "Male" taiwanese_2 "Taiwanese Identity" ///
					1.treatment_word "Group 1" 2.treatment_word "Group 2" ///
					3.treatment_word "Group 3" 4.treatment_word "Group 4" ///
					1.partisanship_3 "Partisanship" 2.partisanship_3 "Not Incumbent" 3.partisanship_3 "Incumbent") ///
				cells(b(fmt(3)) se(fmt(3) par) p(fmt(3) par([ ]))) ///
				nonote ///
				addnotes("Note: Group 2: Defend our country and fight on the battlefield; Group 3: Defend our country and fight. Group 4: Defend our country. The baseline group is Group 1: Fight on the battlefield. All models report ordered logit regression. Robust standard errors in parentheses. P-values in brackets.")
				
		* Table S.10. HTE by patriotism from linear probability model *
			esttab ols_words_2_X_patriot_2 ols_words_4_X_patriot_2 ///
				, replace ///
				mgroups("Model 1", pattern(1 0)) ///
				mtitles("(a)" "(b)") ///
				label compress nonumbers ///
				varwidth(30) modelwidth(12) ///
				stats(r2_a N, ///
					labels("Adj R-sq." "No. of Obs.")) ///
				starlevels("`=uchar(8224)'" 0.10 * 0.05 ** 0.01 *** 0.001) ///
				varlabels(_cons "Constant" male "Male" taiwanese_2 "Taiwanese Identity" ///
					1.partisanship_3 "Partisanship" 2.partisanship_3 "Not Incumbent" 3.partisanship_3 "Incumbent") ///
				cells(b(fmt(3)) se(fmt(3) par) p(fmt(3) par([ ]))) ///
				nonote ///
				addnotes("Note: The dependent variable (DV) in Model 1(a) is a binary variable. The DV in Model 1(b) is a four-point Likert scale variable. All models report OLS regression. Robust standard errors in parentheses. P-values in brackets.")
	}
}


********************************
**** Descriptive Statistics ****
********************************
{
	*************
	// Study 1 //
	*************
	{
		use "$dir/study1", clear
		global rob = "vce(robust)"
		global cov = "male agen agen2 high_educ taiwanese_2 ib1.partisanship_3 "
		qui reg will_fight_2 ib1.treatment_word $cov patriotism_2, $rob
		keep if e(sample)
		
		* Table S.6.1. Descriptive statistics (Study 1) *
			qui estpost sum male agen high_educ taiwanese_2 partisanship_3 treatment_word will_fight_2 patriotism_2, listwise
			est store sumtab
			esttab sumtab ///
				, replace ///
				label nodepvar nomti nonum noobs varwidth(20) ///
				cells("count mean(fmt(%5.3f)) sd(fmt(%5.3f)) min max") ///
				collabels("N" "Mean" "SD" "Min" "Max")
				
		* Table S.6.2. Descriptive statistics by treatment (Study 1) *
			gen N = 1
			table (var) (treatment_word ) , ///
				stat(count N ) ///
				stat(fvpercent male ) ///
				stat(mean agen ) ///
				stat(fvpercent high_educ) ///
				stat(fvpercent taiwanese_2) ///
				stat(fvpercent partisanship_3) ///
				stat(fvpercent will_fight_2) ///
				stat(fvpercent patriotism_2) ///
				nformat(%5.2f mean) nformat(%5.2f fvpercent) ///
				sformat(%s ) sformat(%s%% fvpercent) style(table-1)
			collect label levels treatment_word 1 "Group 1" 2 "Group 2" 3 "Group 3" 4 "Group 4", modify
			collect style putdocx, ///
				title(Table S.6.2. Descriptive statistics by treatment (Study 1)) ///
				note("Note: Group 1: Fight on the battlefield; Group 2: Defend our country and fight on the battlefield; Group 3: Defend our country and fight; Group 4: Defend our country.")
	}
	
	*************
	// Study 2 //
	*************
	{
		use "$dir/study2", clear
		global rob = "vce(robust)"
		global cov = "male agen agen2 high_educ taiwanese_2 ib1.partisanship_3 "
		qui reg will_fight_2 ib1.treatment_word $cov, $rob
		keep if e(sample)
		
		* Table S.6.3. Descriptive statistics (Study 2) *
			qui estpost sum male agen high_educ taiwanese_2 partisanship_3 treatment_word will_fight_2, listwise
			est store sumtab
			esttab sumtab ///
				, replace ///
				label nodepvar nomti nonum noobs varwidth(20) ///
				cells("count mean(fmt(%5.3f)) sd(fmt(%5.3f)) min max") ///
				collabels("N" "Mean" "SD" "Min" "Max")
				
		* Table S.6.4. Descriptive statistics by treatment (Study 2) *
			gen N = 1
			table (var) (treatment_word ) , ///
				stat(count N ) ///
				stat(fvpercent male ) ///
				stat(mean agen ) ///
				stat(fvpercent high_educ) ///
				stat(fvpercent taiwanese_2) ///
				stat(fvpercent partisanship_3) ///
				stat(fvpercent will_fight_2) ///
				nformat(%5.2f mean) nformat(%5.2f fvpercent) ///
				sformat(%s ) sformat(%s%% fvpercent) style(table-1)
			collect label levels treatment_word 1 "Group 1" 2 "Group 2" 3 "Group 3" 4 "Group 4", modify
			collect style putdocx, ///
				title(Table S.6.4. Descriptive statistics by treatment (Study 2)) ///
				note("Note: Group 1: Fight on the battlefield; Group 2: Defend our country and fight on the battlefield; Group 3: Defend our country and fight; Group 4: Defend our country.")
	}
	
	*************
	// Study 3 //
	*************
	{
		use "$dir/study3", clear
		global rob = "vce(robust)"
		global cov = "agen agen2 high_educ "
		qui reg will_fight_2 ib1.treatment_word $cov, $rob
		keep if e(sample)
		
		* Table S.6.5. Descriptive statistics (Study 3) *
			qui estpost sum agen high_educ treatment_word will_fight_2, listwise
			est store sumtab
			esttab sumtab ///
				, replace ///
				label nodepvar nomti nonum noobs varwidth(20) ///
				cells("count mean(fmt(%5.3f)) sd(fmt(%5.3f)) min max") ///
				collabels("N" "Mean" "SD" "Min" "Max")
				
		* Table S.6.6. Descriptive statistics by treatment (Study 3) *
			gen N = 1
			table (var) (treatment_word ) , ///
				stat(count N ) ///
				stat(mean agen ) ///
				stat(fvpercent high_educ) ///
				stat(fvpercent will_fight_2) ///
				nformat(%5.2f mean) nformat(%5.2f fvpercent) ///
				sformat(%s ) sformat(%s%% fvpercent) style(table-1)
			collect label levels treatment_word 1 "Group 1" 2 "Group 2" 3 "Group 3" 4 "Group 4", modify
			collect style putdocx, ///
				title(Table S.6.6. Descriptive statistics by treatment (Study 3)) ///
				note("Note: Group 1: Fight on the battlefield; Group 2: Defend our country and fight on the battlefield; Group 3: Defend our country and fight; Group 4: Defend our country.")
			
		* Table S.6.7. Age by battalion (Study 3) *
			eststo sumtab: estpost tabstat agen, by(battalion_str) ///
				statistics(count mean sd min max) columns(statistics) listwise
			esttab sumtab ///
				, replace ///
				cells("count mean(fmt(%5.3f)) sd(fmt(%5.3f)) min max") ///
				collabels("N" "Mean" "SD" "Min" "Max") ///
				noobs nonote nomtitle nonumber ///
				note("Note: Study 3 was conducted at a military training center located in Taichung.")
	}
	
	*************
	// Study 4 //
	*************
	{
		use "$dir/study4", clear
		global cov = "agen agen2 high_educ "
		qui reg listscore_defend_battle $cov
		keep if e(sample)
		
		* Table S.6.8. Descriptive statistics (Study 4) *
			qui estpost sum agen high_educ, listwise
			est store sumtab
			esttab sumtab ///
				, replace ///
				label nodepvar nomti nonum noobs varwidth(20) ///
				cells("count mean(fmt(%5.3f)) sd(fmt(%5.3f)) min max") ///
				collabels("N" "Mean" "SD" "Min" "Max")
				
		* Table S.6.9. Descriptive statistics by treated/control group (Study 4) *
			gen N = 1
			table (var) (listgroup_defend_battle ) , ///
				stat(count N ) ///
				stat(mean agen ) ///
				stat(fvpercent high_educ) ///
				nformat(%5.2f mean) nformat(%5.2f fvpercent) ///
				sformat(%s ) sformat(%s%% fvpercent) style(table-1)
			
		* Table S.6.10. Age by area and battalion (Study 4) *
			eststo sumtab: estpost tabstat agen, by(area_batt_n) ///
				statistics(count mean sd min max) columns(statistics) listwise
			esttab sumtab ///
				, replace ///
				cells("count mean(fmt(%5.3f)) sd(fmt(%5.3f)) min max") ///
				collabels("N" "Mean" "SD" "Min" "Max") ///
				noobs nonote nomtitle nonumber ///
				note("Note: Battalion A and B were conducted at a military training center located in Taichung. Battalion C was conducted at Tainan training center.")
	}
	
	**************************
	// Study 2 and WVS-2019 //
	**************************
	{
		use "$dir/study2", clear
		gen year = 2024
		gen wave = .
		keep year wave will_fight_2 treatment_word female male agen
		order year wave will_fight_2 treatment_word female male agen
		append using "$dir/wvs_taiwan"
		global rob = "vce(robust)"
		global cov = "male agen agen2 high_educ taiwanese_2 ib1.partisanship_3 "
		keep if year >= 2019
		
		* Sample *
			gen sampletype = .
			replace sampletype = 1 if year == 2024
			replace sampletype = 2 if year == 2019
			lab def sampletype 1 "Study 2" 2 "WVS-2019", modify
			lab val sampletype sampletype
			lab var sampletype "Dataset"
			
		* Age group *
			gen agegroup = .
			replace agegroup = 1 if inrange(agen, 18, 29)
			replace agegroup = 2 if inrange(agen, 30, 39)
			replace agegroup = 3 if inrange(agen, 40, 49)
			replace agegroup = 4 if inrange(agen, 50, 59)
			replace agegroup = 5 if agen >= 60 & agen != .
			lab def agegroup 1 "18-29" 2 "30-39" 3 "40-49" 4 "50-59" 5 "60+", modify
			lab val agegroup agegroup
			lab var agegroup "Age Group"
			fre agegroup
			
		* Table S.2.2. Gender and age group by Dataset (Study 2 and WVS-2019) *
			gen N = 1
			table (var) (sampletype) if inlist(treatment_word, 3, 5) , ///
				stat(count N ) ///
				stat(fvpercent male ) ///
				stat(fvpercent agegroup ) ///
				nformat(%5.2f mean) nformat(%5.2f fvpercent) ///
				sformat(%s ) sformat(%s%% fvpercent) style(table-1)
			collect style putdocx, ///
				title(Table S.2.2. Gender and age group by Dataset (Study 2 and WVS-2019))
	}
}


******************** The End ********************

